
<!DOCTYPE html>
<html>

<head>
<title>Sort within Cindy JS</title>
<meta charset="UTF-8">
<script type="text/javascript" src="../../build/js/Cindy.js"></script>
<script type="text/javascript" src="../../build/js/CindyGL.js"></script>
<script id="csdraw" type="text/x-cindyscript">

colorplot(
  sort([random(),random(),random()]);
)
</script>
<script type="text/javascript">
var cdy = CindyJS({
  ports: [{id: "CSCanvas", transform:[{visibleRect:[0,0,1,1]}]}],
  scripts: "cs*",
  language: "en",
  defaultAppearance: {
  },
  geometry: [
    {name:"A", type:"Free", pos:[.1,.1]}
  ],
  use: ["CindyGL"]
});
</script>
The image should appear blueish due to sorting within the rgb-component.
</head>

<body style="font-family:Arial;">
  <div id="CSCanvas" style="width:500px; height:500px; border:2px solid black"></div>
</body>

</html>
